//
//  MineLeftHeadCVCell.m
//  Shine
//
//  Created by dllo on 16/3/10.
//  Copyright © 2016年 王斌. All rights reserved.
//

#import "MineLeftHeadCVCell.h"
#define WIDTHCVCELL self.contentView.frame.size.width
#define HEIGHTCVCELL self.contentView.frame.size.height
@implementation MineLeftHeadCVCell
- (id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createCell];
    }
    return self;
}

- (void)createCell{

    self.titleLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.titleLabel];
    
    self.buttonImage = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.contentView addSubview:self.buttonImage];
    
    self.kcalNumberLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.kcalNumberLabel];
    
    self.kcalLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.kcalLabel];
    
    self.progressView = [[UIProgressView alloc] init];
    [self.contentView addSubview:self.progressView];
    
    self.objectivesLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.objectivesLabel];
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.titleLabel.frame = CGRectMake(10, 10, WIDTHCVCELL, 30);
    self.buttonImage.frame = CGRectMake(10, 50, 70, 70);
    self.kcalNumberLabel.frame = CGRectMake(90, 50, 150, 70);
    self.kcalNumberLabel.font = [UIFont systemFontOfSize:50];
    self.kcalNumberLabel.textAlignment = YES;
    self.kcalLabel.frame = CGRectMake(240, 70, 100, 30);
    self.progressView.frame = CGRectMake(20, 110, WIDTHCVCELL-50, 20);
    self.objectivesLabel.frame = CGRectMake(10, 140, WIDTHCVCELL, 30);
    
}



@end
